package cn.ad.server.domain.enumration;

import java.util.HashMap;
import java.util.Map;

/**
 * @author dongbin.yu
 * @from 2016-05-23
 * @since V1.0
 */
public enum MaterialFormat {
    JPG(1,"jpg"),
    PNG(2,"png"),
    GIF(3,"gif"),
    TEXT(4,"text"),
    MP4(5,"mp4"),
    FLV(6,"flv");

    public final static Map<Integer, MaterialFormat> materialFormatMap = new HashMap<>();

    static {
        for (MaterialFormat materialFormat : values()) {
            materialFormatMap.put(materialFormat.getValue(), materialFormat);
        }
    }

    private int value;

    private String name;

    MaterialFormat(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }
}
